﻿<%
'先定义
Dim ID				
Dim UserName		
Dim Info_Type		
Dim Info_Title		
Dim Info_Content	
Dim Info_Link		
Dim Info_Tel		
Dim Info_Add_Date	
Dim Info_Add_IP		

Sub Get_Data()
	Info_Type		= Reform("Info_Type")		
	Info_Title		= Reform("Info_Title")		
	Info_Content	= Reform("Info_Content")	
	Info_Link		= Reform("Info_Link")		
	Info_Tel		= Reform("Info_Tel")		
	Info_Add_Date	= Reform("Info_Add_Date")	
	Info_Add_IP		= Reform("Info_Add_IP")		
	
End Sub 

Sub Person_Info_Add()
	Call Get_Data()

	Sql = "INSERT INTO Person_Info ( "&_
			"PI_Title"&_	
			",PI_Desc"&_                
			",PI_Type"&_		
			",PI_Area"&_                
						
			",PI_Link"&_		
			",PI_Address"&_	
			",PI_Tel"&_		
			",PI_Email"&_	
			",PI_Website"&_	
			",PI_QQ"&_		
			",Update_Name"&_		
			",Update_Date"&_
			")VALUES("&_
			"'"&PI_Title&"'"&_	
			",'"&PI_Desc&"'"&_                
			",'"&PI_Type&"'"&_		
			",'"&PI_Area&"'"&_                
						
			",'"&PI_Link&"'"&_		
			",'"&PI_Address&"'"&_	
			",'"&PI_Tel&"'"&_		
			",'"&PI_Email&"'"&_	
			",'"&PI_Website&"'"&_	
			",'"&PI_QQ&"'"&_		
			",'"&Update_Name&"'"&_		
			",'"&Update_Date&"'"&_
			")"
	conn.execute(sql)

	AlertBox "增加成功！","Person_Info_Query.asp"

End Sub 
Sub Member_Info_Edit()
	ID = Reform("ID")
	Call Check_IsNumeric(ID)
	Call Get_Data()

	Sql = "UPDATE Member_Info SET "&_
		" Info_Type='"&Info_Type&"'"&_		
		",Info_Title='"&Info_Title&"'"&_		
		",Info_Content='"&Info_Content&"'"&_	
		",Info_Link='"&Info_Link&"'"&_		
		",Info_Tel='"&Info_Tel&"'"&_		

		" WHERE ID="&ID
    conn.execute(sql)

	AlertBox "修改成功！","Member_Info_Query.asp"

End Sub 
Sub Person_Info_Del()

	Info_ID = Reform("OP_ID")
	
	sql = "DELETE FROM  Member_Info WHERE PI_ID IN ( "&Info_ID &")"

    conn.execute(sql)

	AlertBox "删除成功","Member_Info_Query.asp"

End Sub 
Sub Get_Info()	
	ID = requery("ID")

	Call Check_IsNumeric(ID)

	sql = "SELECT * FROM Member_Info WHERE ID = " &ID
	
	Set rs = conn.execute(sql)
	
	If Not rs.eof Then
		Info_Type =rs("Info_Type")		
		Info_Title =rs("Info_Title")		
		Info_Content =rs("Info_Content")	
		Info_Link =rs("Info_Link")		
		Info_Tel =rs("Info_Tel")		
		Info_Add_Date =rs("Info_Add_Date")	
		Info_Add_IP =rs("Info_Add_IP")		
	End If

End Sub 
%>


